package com.angel.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
public class Ueditor {


    @RequestMapping(value = "/ueditor")
    @ResponseBody
    public String ueditor(HttpServletRequest request, HttpServletResponse response) {

        String config ="{\n" +
                "    \"imageActionName\": \"/file/editorupload\",\n" +
                "    \"imageFieldName\": \"upfile\",\n" +
                "    \"imageMaxSize\": 2048000,\n" +
                "    \"imageAllowFiles\": [\n" +
                "        \".png\",\n" +
                "        \".jpg\",\n" +
                "        \".jpeg\",\n" +
                "        \".gif\",\n" +
                "        \".bmp\"\n" +
                "    ],\n" +
                "    \"imageCompressEnable\": true,\n" +
                "    \"imageCompressBorder\": 1600,\n" +
                "    \"imageInsertAlign\": \"none\",\n" +
                "    \"imageUrlPrefix\": \"\",\n" +
                "    \"imagePathFormat\": \"/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}\",\n" +
                "    \"scrawlActionName\": \"uploadscrawl\",\n" +
                "    \"scrawlFieldName\": \"upfile\",\n" +
                "    \"scrawlPathFormat\": \"/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}\",\n" +
                "    \"scrawlMaxSize\": 2048000,\n" +
                "    \"scrawlUrlPrefix\": \"\",\n" +
                "    \"scrawlInsertAlign\": \"none\",\n" +
                "    \"snapscreenActionName\": \"uploadimage\",\n" +
                "    \"snapscreenPathFormat\": \"/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}\",\n" +
                "    \"snapscreenUrlPrefix\": \"\",\n" +
                "    \"snapscreenInsertAlign\": \"none\",\n" +
                "    \"catcherLocalDomain\": [\n" +
                "        \"127.0.0.1\",\n" +
                "        \"localhost\",\n" +
                "        \"img.baidu.com\"\n" +
                "    ],\n" +
                "    \"catcherActionName\": \"catchimage\",\n" +
                "    \"catcherFieldName\": \"source\",\n" +
                "    \"catcherPathFormat\": \"/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}\",\n" +
                "    \"catcherUrlPrefix\": \"\",\n" +
                "    \"catcherMaxSize\": 2048000,\n" +
                "    \"catcherAllowFiles\": [\n" +
                "        \".png\",\n" +
                "        \".jpg\",\n" +
                "        \".jpeg\",\n" +
                "        \".gif\",\n" +
                "        \".bmp\"\n" +
                "    ],\n" +
                "    \"videoActionName\": \"uploadvideo\",\n" +
                "    \"videoFieldName\": \"upfile\",\n" +
                "    \"videoPathFormat\": \"/ueditor/jsp/upload/video/{yyyy}{mm}{dd}/{time}{rand:6}\",\n" +
                "    \"videoUrlPrefix\": \"\",\n" +
                "    \"videoMaxSize\": 102400000,\n" +
                "    \"videoAllowFiles\": [\n" +
                "        \".flv\",\n" +
                "        \".swf\",\n" +
                "        \".mkv\",\n" +
                "        \".avi\",\n" +
                "        \".rm\",\n" +
                "        \".rmvb\",\n" +
                "        \".mpeg\",\n" +
                "        \".mpg\",\n" +
                "        \".ogg\",\n" +
                "        \".ogv\",\n" +
                "        \".mov\",\n" +
                "        \".wmv\",\n" +
                "        \".mp4\",\n" +
                "        \".webm\",\n" +
                "        \".mp3\",\n" +
                "        \".wav\",\n" +
                "        \".mid\"\n" +
                "    ],\n" +
                "    \"fileActionName\": \"uploadfile\",\n" +
                "    \"fileFieldName\": \"upfile\",\n" +
                "    \"filePathFormat\": \"/ueditor/jsp/upload/file/{yyyy}{mm}{dd}/{time}{rand:6}\",\n" +
                "    \"fileUrlPrefix\": \"\",\n" +
                "    \"fileMaxSize\": 51200000,\n" +
                "    \"fileAllowFiles\": [\n" +
                "        \".png\",\n" +
                "        \".jpg\",\n" +
                "        \".jpeg\",\n" +
                "        \".gif\",\n" +
                "        \".bmp\",\n" +
                "        \".flv\",\n" +
                "        \".swf\",\n" +
                "        \".mkv\",\n" +
                "        \".avi\",\n" +
                "        \".rm\",\n" +
                "        \".rmvb\",\n" +
                "        \".mpeg\",\n" +
                "        \".mpg\",\n" +
                "        \".ogg\",\n" +
                "        \".ogv\",\n" +
                "        \".mov\",\n" +
                "        \".wmv\",\n" +
                "        \".mp4\",\n" +
                "        \".webm\",\n" +
                "        \".mp3\",\n" +
                "        \".wav\",\n" +
                "        \".mid\",\n" +
                "        \".rar\",\n" +
                "        \".zip\",\n" +
                "        \".tar\",\n" +
                "        \".gz\",\n" +
                "        \".7z\",\n" +
                "        \".bz2\",\n" +
                "        \".cab\",\n" +
                "        \".iso\",\n" +
                "        \".doc\",\n" +
                "        \".docx\",\n" +
                "        \".xls\",\n" +
                "        \".xlsx\",\n" +
                "        \".ppt\",\n" +
                "        \".pptx\",\n" +
                "        \".pdf\",\n" +
                "        \".txt\",\n" +
                "        \".md\",\n" +
                "        \".xml\"\n" +
                "    ],\n" +
                "    \"imageManagerActionName\": \"listimage\",\n" +
                "    \"imageManagerListPath\": \"/ueditor/jsp/upload/image/\",\n" +
                "    \"imageManagerListSize\": 20,\n" +
                "    \"imageManagerUrlPrefix\": \"\",\n" +
                "    \"imageManagerInsertAlign\": \"none\",\n" +
                "    \"imageManagerAllowFiles\": [\n" +
                "        \".png\",\n" +
                "        \".jpg\",\n" +
                "        \".jpeg\",\n" +
                "        \".gif\",\n" +
                "        \".bmp\"\n" +
                "    ],\n" +
                "    \"fileManagerActionName\": \"listfile\",\n" +
                "    \"fileManagerListPath\": \"/ueditor/jsp/upload/file/\",\n" +
                "    \"fileManagerUrlPrefix\": \"\",\n" +
                "    \"fileManagerListSize\": 20,\n" +
                "    \"fileManagerAllowFiles\": [\n" +
                "        \".png\",\n" +
                "        \".jpg\",\n" +
                "        \".jpeg\",\n" +
                "        \".gif\",\n" +
                "        \".bmp\",\n" +
                "        \".flv\",\n" +
                "        \".swf\",\n" +
                "        \".mkv\",\n" +
                "        \".avi\",\n" +
                "        \".rm\",\n" +
                "        \".rmvb\",\n" +
                "        \".mpeg\",\n" +
                "        \".mpg\",\n" +
                "        \".ogg\",\n" +
                "        \".ogv\",\n" +
                "        \".mov\",\n" +
                "        \".wmv\",\n" +
                "        \".mp4\",\n" +
                "        \".webm\",\n" +
                "        \".mp3\",\n" +
                "        \".wav\",\n" +
                "        \".mid\",\n" +
                "        \".rar\",\n" +
                "        \".zip\",\n" +
                "        \".tar\",\n" +
                "        \".gz\",\n" +
                "        \".7z\",\n" +
                "        \".bz2\",\n" +
                "        \".cab\",\n" +
                "        \".iso\",\n" +
                "        \".doc\",\n" +
                "        \".docx\",\n" +
                "        \".xls\",\n" +
                "        \".xlsx\",\n" +
                "        \".ppt\",\n" +
                "        \".pptx\",\n" +
                "        \".pdf\",\n" +
                "        \".txt\",\n" +
                "        \".md\",\n" +
                "        \".xml\"\n" +
                "    ]\n" +
                "}";
        return config;

    }

}
